// Created from GenerationTemplate
// For Decisions HL7 Engine
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.Reflection;
using DecisionsFramework.Design.Properties;
using Decisions.HL7.Generated.AbstractMessage;
using Decisions.HL7.DataTypes;
using ST = System.String;
using SI = System.String;
using TX = System.String;
using FT = System.String;
using IS = System.String;
using ID = System.String;
using SNM = System.String;

namespace Decisions.HL7.Message
{
    [DataContract]
	public class GOL : AbstractSegment
    {

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("1 Action Code",1)]
  	    [HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.True,"ID")]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.True,"ID")]
		[ProblemGoalActionCode]
	    public ID ActionCode {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("2 Action Date/Time",2)]
  	    [HL7Field(HL7Version.v23, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 2, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 2, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 2, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM ActionDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("3 Goal ID",3)]
  	    [HL7Field(HL7Version.v23, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 3, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 3, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 3, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE GoalID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("4 Goal Instance ID",4)]
  	    [HL7Field(HL7Version.v23, 4, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v231, 4, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v24, 4, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v25, 4, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v251, 4, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v26, 4, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v27, 4, HL7Repeat.False, HL7Required.True,"EI")]
	    public EI GoalInstanceID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("5 Episode of Care ID",5)]
  	    [HL7Field(HL7Version.v23, 5, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v231, 5, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v24, 5, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v25, 5, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v251, 5, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v26, 5, HL7Repeat.False, HL7Required.True,"EI")]
  	    [HL7Field(HL7Version.v27, 5, HL7Repeat.False, HL7Required.True,"EI")]
	    public EI EpisodeofCareID {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("6 Goal List Priority",6)]
  	    [HL7Field(HL7Version.v23, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v231, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v24, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v25, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v251, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v26, 6, HL7Repeat.False, HL7Required.True,"NM")]
  	    [HL7Field(HL7Version.v27, 6, HL7Repeat.False, HL7Required.True,"NM")]
	    public NM GoalListPriority {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("7 Goal Established Date/Time",7)]
  	    [HL7Field(HL7Version.v23, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 7, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 7, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 7, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM GoalEstablishedDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("8 Expected Goal Achievement Date/Time",8)]
  	    [HL7Field(HL7Version.v23, 8, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 8, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 8, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 8, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 8, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 8, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 8, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM ExpectedGoalAchievementDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("9 Goal Classification",9)]
  	    [HL7Field(HL7Version.v23, 9, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 9, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 9, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 9, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 9, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 9, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 9, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE GoalClassification {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("10 Goal Management Discipline",10)]
  	    [HL7Field(HL7Version.v23, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 10, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 10, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 10, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE GoalManagementDiscipline {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("11 Current Goal Review Status",11)]
  	    [HL7Field(HL7Version.v23, 11, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 11, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 11, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 11, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 11, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 11, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 11, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE CurrentGoalReviewStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("12 Current Goal Review Date/Time",12)]
  	    [HL7Field(HL7Version.v23, 12, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 12, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 12, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 12, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 12, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 12, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 12, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM CurrentGoalReviewDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("13 Next Goal Review Date/Time",13)]
  	    [HL7Field(HL7Version.v23, 13, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 13, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 13, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 13, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 13, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 13, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 13, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM NextGoalReviewDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("14 Previous Goal Review Date/Time",14)]
  	    [HL7Field(HL7Version.v23, 14, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 14, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 14, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 14, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 14, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 14, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 14, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM PreviousGoalReviewDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("15 Goal Review Interval",15)]
  	    [HL7Field(HL7Version.v23, 15, HL7Repeat.False, HL7Required.True,"TQ")]
  	    [HL7Field(HL7Version.v231, 15, HL7Repeat.False, HL7Required.True,"TQ")]
  	    [HL7Field(HL7Version.v24, 15, HL7Repeat.False, HL7Required.True,"TQ")]
  	    [HL7Field(HL7Version.v25, 15, HL7Repeat.False, HL7Required.True,"TQ")]
  	    [HL7Field(HL7Version.v251, 15, HL7Repeat.False, HL7Required.True,"TQ")]
  	    [HL7Field(HL7Version.v26, 15, HL7Repeat.False, HL7Required.True,"TQ")]
	    public TQ GoalReviewInterval {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("16 Goal Evaluation",16)]
  	    [HL7Field(HL7Version.v23, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 16, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 16, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 16, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE GoalEvaluation {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("17 Goal Evaluation Comment",17)]
  	    [HL7Field(HL7Version.v23, 17, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v231, 17, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v24, 17, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v25, 17, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v251, 17, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v26, 17, HL7Repeat.True, HL7Required.True,"ST")]
  	    [HL7Field(HL7Version.v27, 17, HL7Repeat.True, HL7Required.True,"ST")]
	    public ST[] GoalEvaluationComment {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("18 Goal Life Cycle Status",18)]
  	    [HL7Field(HL7Version.v23, 18, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 18, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 18, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 18, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 18, HL7Repeat.False, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 18, HL7Repeat.False, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 18, HL7Repeat.False, HL7Required.True,"CWE")]
	    public CWE GoalLifeCycleStatus {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("19 Goal Life Cycle Status Date/Time",19)]
  	    [HL7Field(HL7Version.v23, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v231, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v24, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v25, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v251, 19, HL7Repeat.False, HL7Required.True,"TS")]
  	    [HL7Field(HL7Version.v26, 19, HL7Repeat.False, HL7Required.True,"DTM")]
  	    [HL7Field(HL7Version.v27, 19, HL7Repeat.False, HL7Required.True,"DTM")]
	    public DTM GoalLifeCycleStatusDateTime {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("20 Goal Target Type",20)]
  	    [HL7Field(HL7Version.v23, 20, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v231, 20, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v24, 20, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v25, 20, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v251, 20, HL7Repeat.True, HL7Required.True,"CE")]
  	    [HL7Field(HL7Version.v26, 20, HL7Repeat.True, HL7Required.True,"CWE")]
  	    [HL7Field(HL7Version.v27, 20, HL7Repeat.True, HL7Required.True,"CWE")]
	    public CWE[] GoalTargetType {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("21 Goal Target Name",21)]
  	    [HL7Field(HL7Version.v23, 21, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v231, 21, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v24, 21, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v25, 21, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v251, 21, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v26, 21, HL7Repeat.True, HL7Required.True,"XPN")]
  	    [HL7Field(HL7Version.v27, 21, HL7Repeat.True, HL7Required.True,"XPN")]
	    public XPN[] GoalTargetName {get;set;}

        /// -----------------------------
        /// -----------------------------
		[DataMember]
    	[PropertyClassification("22 Mood Code",22)]
  	    [HL7Field(HL7Version.v26, 22, HL7Repeat.False, HL7Required.True,"CNE")]
  	    [HL7Field(HL7Version.v27, 22, HL7Repeat.False, HL7Required.True,"CNE")]
		[MoodCodes]
	    public CNE MoodCode {get;set;}


	    [DataMember]
        [PropertyClassification("AdditionalValue1", 23)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue1 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue2", 24)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue2 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue3", 25)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue3 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue4", 26)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue4 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue5", 27)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue5 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue6", 28)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue6 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue7", 29)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue7 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue8", 30)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue8 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue9", 31)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue9 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue10", 32)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue10 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue11", 33)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue11 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue12", 34)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue12 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue13", 35)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue13 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue14", 36)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue14 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue15", 37)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue15 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue16", 38)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue16 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue17", 39)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue17 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue18", 40)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue18 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue19", 41)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue19 { get; set; }

		    [DataMember]
        [PropertyClassification("AdditionalValue20", 42)]
		[HL7Field(HL7Version.v23, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v231, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v24, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v25, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v251, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v26, 1, HL7Repeat.False, HL7Required.False)]
  	    [HL7Field(HL7Version.v27, 1, HL7Repeat.False, HL7Required.False)]
		public string AdditionalValue20 { get; set; }

	

		internal override void ConsumeTextSegment(string segmentTextData, HL7ParserOptions options)
		{
			string[] segmentTextParts = segmentTextData.Split(new char[] { options.FieldSep }, StringSplitOptions.None);
			ActionCode = (ID)ParseTextAtPositionIntoData(segmentTextParts, 1, options, typeof(ID), "GOL.1");
			ActionDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 2, options, typeof(DTM), "GOL.2");
			GoalID = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 3, options, typeof(CWE), "GOL.3");
			GoalInstanceID = (EI)ParseTextAtPositionIntoData(segmentTextParts, 4, options, typeof(EI), "GOL.4");
			EpisodeofCareID = (EI)ParseTextAtPositionIntoData(segmentTextParts, 5, options, typeof(EI), "GOL.5");
			GoalListPriority = (NM)ParseTextAtPositionIntoData(segmentTextParts, 6, options, typeof(NM), "GOL.6");
			GoalEstablishedDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 7, options, typeof(DTM), "GOL.7");
			ExpectedGoalAchievementDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 8, options, typeof(DTM), "GOL.8");
			GoalClassification = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 9, options, typeof(CWE), "GOL.9");
			GoalManagementDiscipline = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 10, options, typeof(CWE), "GOL.10");
			CurrentGoalReviewStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 11, options, typeof(CWE), "GOL.11");
			CurrentGoalReviewDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 12, options, typeof(DTM), "GOL.12");
			NextGoalReviewDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 13, options, typeof(DTM), "GOL.13");
			PreviousGoalReviewDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 14, options, typeof(DTM), "GOL.14");
			GoalReviewInterval = (TQ)ParseTextAtPositionIntoData(segmentTextParts, 15, options, typeof(TQ), "GOL.15");
			GoalEvaluation = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 16, options, typeof(CWE), "GOL.16");
	    	GoalEvaluationComment = (ST[])ParseTextAtPositionIntoDataArray<ST>(segmentTextParts, 17, options, "GOL.17");
			GoalLifeCycleStatus = (CWE)ParseTextAtPositionIntoData(segmentTextParts, 18, options, typeof(CWE), "GOL.18");
			GoalLifeCycleStatusDateTime = (DTM)ParseTextAtPositionIntoData(segmentTextParts, 19, options, typeof(DTM), "GOL.19");
	    	GoalTargetType = (CWE[])ParseTextAtPositionIntoDataArray<CWE>(segmentTextParts, 20, options, "GOL.20");
	    	GoalTargetName = (XPN[])ParseTextAtPositionIntoDataArray<XPN>(segmentTextParts, 21, options, "GOL.21");
			MoodCode = (CNE)ParseTextAtPositionIntoData(segmentTextParts, 22, options, typeof(CNE), "GOL.22");
		}

		public string GetER7(HL7ParserOptions options) {
			List<string> segmentParts = new List<string>();
			segmentParts.Add("GOL");
		    segmentParts.Add(ActionCode);
			segmentParts.Add(GetER7TextForSegmentPart(ActionDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalID, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalInstanceID, options));
			segmentParts.Add(GetER7TextForSegmentPart(EpisodeofCareID, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalListPriority, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalEstablishedDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(ExpectedGoalAchievementDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalClassification, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalManagementDiscipline, options));
			segmentParts.Add(GetER7TextForSegmentPart(CurrentGoalReviewStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(CurrentGoalReviewDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(NextGoalReviewDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(PreviousGoalReviewDateTime, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalReviewInterval, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalEvaluation, options));
		    segmentParts.Add(ConvertStringArray(GoalEvaluationComment, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalLifeCycleStatus, options));
			segmentParts.Add(GetER7TextForSegmentPart(GoalLifeCycleStatusDateTime, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(GoalTargetType, options));
		    segmentParts.Add(GetER7TextForSegmentArrayPart(GoalTargetName, options));
			segmentParts.Add(GetER7TextForSegmentPart(MoodCode, options));
			return string.Join("" + options.FieldSep, segmentParts.ToArray());
		}

    }
}

